@model EditUserViewModel

<input asp-for="Id" type="hidden" />

<div class="form-group" asp-validation-class-for="UserName">
    <label asp-for="UserName">@T["User name"]</label>
    <span asp-validation-for="UserName" class="text-danger">@T["The user name is required."]</span>
    <input asp-for="UserName" class="form-control" autofocus />
</div>

<div class="form-group" asp-validation-class-for="Email">
    <label for="Email">@T["Email"]</label>
    <span asp-validation-for="Email" class="text-danger">@T["The email is invalid."]</span>
    <input asp-for="Email" class="form-control" type="email" />
</div>

<h6>@T["Roles"]</h6>
<div class="form-group">
    @for (var i = 0; i < Model.Roles.Length; i++)
    {
        <div class="form-check">
            <label class="form-check-label" asp-for="Roles[i].IsSelected">

                <input class="form-check-input" type="checkbox" asp-for="Roles[i].IsSelected" />
                <input type="hidden" asp-for="Roles[i].Role" />
                @Model.Roles[i].Role
            </label>
        </div>
    }
</div>